import React from "react"
import type { 
  FC, 
  PropsWithChildren, 
  ReactNode, 
  MouseEventHandler 
} from "react"

interface Route {
  path:string
  breadcrumbName:string
  children:Array<{
    path:string
    breadcrumbName:string
  }>
}

interface BreadcrumbExtraProp {
  Item:FC<PropsWithChildren<BreadcrumbItemProps>>
}

interface BreadcrumbProps {
  itemRender?(route:Route, params:object, routes:Route[], paths:string[]):ReactNode
  params?:object
  routes?:Route[]
  separator?:string|ReactNode
}

interface BreadcrumbItemProps {
  href?:string
  separator?:string|ReactNode
  overlay?:object
  onClick?:MouseEventHandler<HTMLElement>
}

const Breadcrumb: FC<PropsWithChildren<BreadcrumbProps>> & BreadcrumbExtraProp = props=>null

Breadcrumb.Item = props=>null

export default Breadcrumb

